//
//  BaseWebViewController.m
//  ShareParking
//
//  Created by STAR on 2017/8/8.
//  Copyright © 2017年 zjw. All rights reserved.
//

#import "BaseWebViewController.h"

@interface BaseWebViewController ()

@end

@implementation BaseWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self priviteMethod];
}


-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
  //  [Utils SetNaviBarGreenStyle:self];
}


- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
}

- (void)priviteMethod {
//    SEL sel = NSSelectorFromString(@"layoutButtonsForCurrentSizeClass");
//    if ([[TOWebViewController class] instanceMethodSignatureForSelector:sel]){
//        [super performSelectorOnMainThread:sel withObject:nil waitUntilDone:NO];
//    }
//    NSString *className = NSStringFromClass(self.class);
   // NSLog(@"classname %@", className);
    
    
    //Need
//    static dispatch_once_t onceToken;
//    dispatch_once(&onceToken, ^{
//        Class class = [self class];
//        SEL originalSelector = NSSelectorFromString(@"layoutButtonsForCurrentSizeClass");
//        SEL swizzledSelector = @selector(my_layoutButtonsForCurrentSizeClass);
//
//        Method originalMethod = class_getInstanceMethod(class, originalSelector);
//        Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
//
//        BOOL didAddMethod =
//        class_addMethod(class,
//                        originalSelector,
//                        method_getImplementation(swizzledMethod),
//                        method_getTypeEncoding(swizzledMethod));
//
//        if (didAddMethod) {
//            class_replaceMethod(class,
//                                swizzledSelector,
//                                method_getImplementation(originalMethod),
//                                method_getTypeEncoding(originalMethod));
//        } else {
//            method_exchangeImplementations(originalMethod, swizzledMethod);
//        }
//    });

    
}
- (void)my_layoutButtonsForCurrentSizeClass {
    [self my_layoutButtonsForCurrentSizeClass];
  //  [Utils setNavigationBarLeftButtonWithImage:self imgName:@"newback" actionName:@selector(back)];
//    UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
//    
//    [leftBtn setImage:[UIImage imageNamed:@"newback"] forState:UIControlStateNormal];
//    [leftBtn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
//    UIBarButtonItem *naviItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
//    self.navigationItem.leftBarButtonItems = @[naviItem];
}


- (void)back {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
